#pragma once

#include "QkBaseView.h"
#include "QkTocModel.h"

class QkTocView : public QkBaseView
{
	Q_OBJECT
public:
	QkTocView();
	QkTocView(QWidget *parent);
	~QkTocView();

protected:
	virtual void activated();
	virtual void deactivated();

private slots:
	void on_listView_clicked(const QModelIndex &index);
	void on_openAction_triggered();
	void on_exitAction_triggered();
private:
	virtual QKindleViewId viewId() const;
	void init();

private:
	QListView *m_listView;
	QkTocModel *m_model;
	QList<QAction *> m_actions;
};
